
import '../../entity/setting_entity.dart';
import 'base/json_convert_content.dart';

SettingEntity $SettingEntityFromJson(Map<String, dynamic> json) {
	final SettingEntity settingEntity = SettingEntity();
	final String? apiAddr = jsonConvert.convert<String>(json['api_addr']);
	if (apiAddr != null) {
		settingEntity.apiAddr = apiAddr;
	}

	final String? psw = jsonConvert.convert<String>(json['psw']);
	if (psw != null) {
		settingEntity.psw = psw;
	}
	final String? username = jsonConvert.convert<String>(json['username']);
	if (username != null) {
		settingEntity.username = username;
	}
	final String? port = jsonConvert.convert<String>(json['port']);
	if (port != null) {
		settingEntity.port = port;
	}
	final bool? rememberPaw = jsonConvert.convert<bool>(json['rememberPaw']);
	if (rememberPaw != null) {
		settingEntity.rememberPaw = rememberPaw;
	}
	final String? deviceName = jsonConvert.convert<String>(json['device_name']);
	if (deviceName != null) {
		settingEntity.deviceName = deviceName;
	}
	final String? publishName = jsonConvert.convert<String>(json['publish_name']);
	if (publishName != null) {
		settingEntity.publishName = publishName;
	}
	final String? deviceNo = jsonConvert.convert<String>(json['device_no']);
	if (deviceNo != null) {
		settingEntity.deviceNo = deviceNo;
	}
	final bool? isUltra = jsonConvert.convert<bool>(json['isUltra']);
	if (isUltra != null) {
		settingEntity.isUltra = isUltra;
	}
	return settingEntity;
}

Map<String, dynamic> $SettingEntityToJson(SettingEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['api_addr'] = entity.apiAddr;
	data['psw'] = entity.psw;
	data['username'] = entity.username;
	data['rememberPaw'] = entity.rememberPaw;
	data['isUltra'] = entity.isUltra;
	data['port'] = entity.port;
	data['device_name'] = entity.deviceName;
	data['device_no'] = entity.deviceNo;
	data['publish_name'] = entity.publishName;
	return data;
}